package io.gitee.tuo_tuo.jfinaldevassistance.test;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionContext;
import java.util.Enumeration;

public class MockHttpSession implements HttpSession{

	@Override
	public long getCreationTime() {
		return 0;
	}

	@Override
	public String getId() {
		return null;
	}

	@Override
	public long getLastAccessedTime() {
		
		return 0;
	}

	@Override
	public ServletContext getServletContext() {
		
		return null;
	}

	@Override
	public void setMaxInactiveInterval(int interval) {
		
		
	}

	@Override
	public int getMaxInactiveInterval() {
		
		return 0;
	}

	@Override
	public HttpSessionContext getSessionContext() {
		
		return null;
	}

	@Override
	public Object getAttribute(String name) {
//		if(UserConstants.SESSION_USER.equals(name)){
//			User user = new User();
//			user.setName("admin");
//			return user;
//		}
		return null;
	}

	@Override
	public Object getValue(String name) {
		
		return null;
	}

	@Override
	public Enumeration getAttributeNames() {
		
		return null;
	}

	@Override
	public String[] getValueNames() {
		
		return null;
	}

	@Override
	public void setAttribute(String name, Object value) {
		
		
	}

	@Override
	public void putValue(String name, Object value) {
		
		
	}

	@Override
	public void removeAttribute(String name) {
		
		
	}

	@Override
	public void removeValue(String name) {
		
		
	}

	@Override
	public void invalidate() {
		
		
	}

	@Override
	public boolean isNew() {
		
		return false;
	}

}
